package app.domain.util;

import app.domain.order.util.Side;
import app.domain.order.util.Ticket;
import app.domain.order.util.Type;

public class MessageCreator {
	
	public static String match(int referenceId, int matchReferenceId, int amount, int amountLeft, String fillType, double price) {
		return "referenceId=" + referenceId + ";matchReferenceId=" + matchReferenceId + ";msgType=matchOrder;filled=" 
				+ fillType + ";amount=" + amount + ";amountLeft=" + amountLeft + ";price=" + price;
	}

	public static String newOrder(int referenceId, Ticket ticket, Type type, Side side, int amount, double price) {
		return "referenceId=" + referenceId + ";msgType=newOrderOk;ticket=" + ticket
				+ ";type=" + type + ";side=" + side + ";amount=" + amount 
				+ ";price=" + price;
	}
	
	public static String cancel(int referenceId) {
		return "referenceId=" + referenceId + ";msgType=cancelOrderDone";
	}
	
	public static String noCancel(int referenceId) {
		return "referenceId=" + referenceId + ";msgType=cancelOrderError";
	}
	
}
